# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-colorlog
_pyname=colorlog
pkgver=4.2.1
pkgrel=0
pkgdesc="A formatter for use with Python's logging module"
url="https://github.com/borntyping/python-colorlog"
arch="noarch"
license="MIT"
depends="python3"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="https://files.pythonhosted.org/packages/source/c/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver

replaces="py-colorlog" # Backwards compatibility
provides="py-colorlog=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	cd "$builddir"/colorlog/tests
	PYTHONPATH="$builddir"/build/lib py.test-3
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="781d792da86375848297be8ef691be082608f7a359832c8105cf16ca27acba82090e99a79c06cb55a58896ef4e54aba141e177e89e565c4cce044a9493b204bb  colorlog-4.2.1.tar.gz"
